-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli: add jj operation show
and jj operation diff
commands
#3617
Conversation
7e11943
to
eb59a88
Compare
jj operation diff
commandjj operation show
and jj operation diff
commands
eb59a88
to
c82584f
Compare
7ae89e3
to
c3343eb
Compare
I'm not particularly sure what to test, any suggestions on test cases to add? Maybe some common operations like squash, rebase, git fetch and push? |
I'm also thinking that templates are a good idea, maybe something like |
I think you need to exercise the code for each option that the command handles. |
c3343eb
to
dbb9cec
Compare
Sorry, I missed this event. GitHub doesn't send an email for it. I'll try to remember to review this later today. |
dbb9cec
to
33ee8dd
Compare
I think this really should have some tests. I'll review the code now. |
I'll try to add some testcases when I have the time. Here's the list of operations I think we should test (feel free to suggest more):
I'm not sure how to structure it though: I guess I should add a single test beginning from an empty repo for each of these operations? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems useful, but I haven't reviewed the last patch thoroughly. It's a bit hard to comment on the features without snapshot tests.
Thanks for taking a look @yuja. I'll try to work on adding some tests to make it easier to see what the expected output is like, perhaps further reviews can be put on hold if you'd like.
I'd also like to see if there's any desire to change the output displayed. |
As @joyously said, it's probably best to instead focus on what the code does and the different cases it handles. For example, there's some logic for displaying how refs moved, so there should be some tests demonstrating that, and ideally some including conflicted refs. It doesn't matter which commands you use to create the refs, so use whatever is easiest for that (for creating conflicted branches, it's probably easiest to use
I don't think these two need to be tested. They don't do much you can't test by making the same changes explicitly.
SGTM. |
33ee8dd
to
20e1d3d
Compare
5445df7
to
8b1ebd4
Compare
8b1ebd4
to
5fca665
Compare
82d025f
to
3be04a7
Compare
I've updated this PR with tests. Would appreciate input on whether the output should change in any way, as well as any changes to the tests. |
3be04a7
to
c0de384
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The output looks good to me for now. I think it will be easier to figure out what changes we want to make once we start using these commands. Thanks again! This seems really useful for troubleshooting.
c0de384
to
290ce09
Compare
f4f3b35
to
91ea230
Compare
@yuja would appreciate if you could take another look. I've updated to avoid creating a transaction for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
91ea230
to
4a77667
Compare
4a77667
to
58594af
Compare
Checklist
If applicable:
CHANGELOG.md